fixed and enabled unit tests.