added check if anything was selected in main window
update code
Fixed thumbnails bug