fixed some errors in the unit tests