Added loading logic for vertical gates