Fix a typo in buildGateways()