#109 Fixed exception thrown while redrawing text elements