fix issues pointed by JSHint