Fixed some bug in GUI