Fix to str function needed to cast to text.