[BUGFIX beta] Sync router.js, closes #5167