thumbnail set function fix