Fix a few api errors