Fixed error in parsing dates.