Update controller.js

Applied patch from tsimmons
Merge pull request #46 from cdanielw/master

Update controller.js to resolve issue 45