Fixes issue #567