fix bug with thumbnail referencing