Fix for issue #153
Fix for issue #146