fix bug with thumbnails