Update set_text function

Not sure why the try / catch was failing but this seems to work.