Fix thumbnail detection