fixed javascript linting and typo