fixed gatewayserver, and applied master branch ccommit