fixed/added code for Tk objects