fix broken test logic