Fixed bug with routing not working