Fixes issue #58
Fixes issue #57