-fix 'close' bug