debug some logic error with receive cmd