Fix various stuffs on GUI code