Fixed bug causing thumbnails to be loaded twice