Bugfix

Fix bug with generating thumbnails