time comparison fix