fix data incosistency bug