Fix for issue #28
Fix for issue #29