Bug fix for thumbnails