Bug fix for the unit tests