fixed some jshint errors