fix some small errors that were detected by jshint.