Fixed ImageWriteException error