Finally fix the thumbnail creation