Fix for issue #50

See #50, #49