Grounding a generator