Fixes issue #1261