Fix references to envs for headpin