Fix javascript errors from linter