Fixed some errors about gui