Fixes issue #1033.