fixing time comparison