fixes issue #319