fixed small bugs with text nesting