Fixed gui behavior