Fixed a bug in the tests