fixed some gui code