fix the datetime error