fixed error which can not access the api gateway