fix data.p race condition problem