Fix incorrect display of thumbnails. Patch contributed by Edu Hackenitz (thanks!)