routes.js bug fix