Fix ordering of routes so that api is still working.