Fixed bug in routes.py