fixed NPE in LocalGatewayMetaState