Fix bug with date