fixed a bug in the tests