added code to deal with the random tabs that xicontrol seems to put in its output