Corrected a bug in the unit tests