Fix to thumbnail creations

I've fixed the thumbnail creation.