fix the bug that the datas may be calculated more than one time