Fixed some jslint bugs