fix bug in gateway config