fixes linting errors in controller.js