Fixed bug in date printing