remove inconsistency issues, optimized the efficency