implemented fix for issue #392