some js fixes to handle texts with depth of 1 in the text menu.