fixing some JSHint warnings