Fixed scope problems with IE, renamed close()