Apply the patch from @kinnison to fix #1121 thanks DalekSec for pursuing.