Fix a couple of issues

Fixes #16 and #17