intermediate state fixing gui repaint problems