Fixes datetime problem and PIL problem