dates bug fix