Fixed gui bugs