minor fix to controller.js