Fixes issue #1056