Fixed some gui bugs