Fixed a bug with the routes system which was taking partial matches over full matches