Fix a test and another broken function