Fix minor bug in tests