fixed some gui bugs