Fix bug with saving thumbnails (#203)