Fixed bug in the tests