repaired some unit tests