Fix bug in orientation of dates