Fix order of route registration.