Fixes issue #246