fix startx logic