new gateways and auto-remove empty