fixed the printing of date