fix gateways