fixing date recording error