Fix for issue #146