Fixed the api stuff