Fixed creating thumbnails.