Fix bug with compare time