fix the wrapped timestamp problem