modify init for fix bug of error gateway