api routes not defined bug