add safety for text string setup in lua