fix for issue #158