Fix "cannot read property 'pure_text'" error