Fixed gui and code