fixed bug in tkinter gui