Change code to pass jsLint