fixed problems in unit tests