Fix for issue #16
Fix for issue #17