fixed some JSHint findings