Resolved a bug of gateway.