Fixed mechanical mistakes in the api