Fixed "NameError: global name 'close' is not defined" during setup.