Fixed extra window creation bug when squares are pressed. Also fixed several sync issues