Fixes to make all tests pass (closes #4)