Fixes issue #476