Fix thumbnails generation