Unit test fixes

I've fixed some unit tests (as preparation for issue 54)