Fixed routing getting confused by trailing ampersand on certain environments, closes #599