Fixes issue #1667