Fix bug with wrong date parsing