fixes issue #240