fixed UnboundLocalError: local variable 'winz' referenced before assignment