Fixing PIL issues.