fixed bug on gateway config