More fixes so the API works