Additionally previous was referenced before assignment, so moved it up a scope level.
Fixed "NameError: free variable 'chan' referenced before assignment i…
…n enclosing scope"
Thanks! Can you rebase against the 1.9 branch, and tweak the changelog so it explicitly mentions that these scoping issues were fixed in hide, show and remote_tunnel?
Sure, need a new PR for this though.