Fix for issue 49

Fixes issue #49