Fixed an awful bug in helpers.js