fix a bug in transitting data