fixes to pass jshint