fixed bugs in units tests
cleanup unit tests