fix test logic