Fix for issue #158