JSHint error fixing