fixed bug for thumbnails