fixed time comparison error