Fix bug in Js controller helper