fixed a bug in the routes