fixed most unit tests to comply with latest changes