Fix JS linting errors