#49 and #50

Fixes #49 and #50