Fixes #44 and #45

Fixes the issues I just created.