Fixes issue 1069