Fixed a build ordering issue in the router