fix a bug in tests