Fix string time comparison bug