Fixed some GUI related bugs