Fix thumbnail functionality