Fixed some gui level bugs