improved thumbnail handling
improved thumbnail handling