Fix gear environment.