fixed unit tests, fixes #4