router.js fix bad code