Fixing syntax of JS (to ensure that it compiles in travis)