Fix issue with return datetime objects