Fix for issue #165