fixed several gui bugs