fixed a bug in tests