fixed a bug with routing