Fixing bug when routing url with parameters