fixed date and time bug