Fix for datetime objects