Fix thumbnail creation