fix for issue #318