fixed date error in an ugly way