Fix bug involving duplicate times