fixed bug in tk UI introduced by previous commit