See https://stackoverflow.com/q/58555626/2931197 . Signed-off-by: Philip Withnall <withnall@endlessm.com>