Fixed bugs in the order of application routes.