I've noticed there's a logic error in controller.js, pushing updated version.