fix api routes