Fixed ImportError when using Pillow