fixes issue #319

Fixes #319