fixed another issue in thumbnails code