Fixed bugs in URL assemble/route