fixing some bugs in graphical interface