Fixes issue 246