Fixes issue #327