unit tests fixes