fix O3 caused incorrect timing problems.