Fixed issues found by jslint