some fixes on unit tests