Fix for issue #161