duplicated the bool set on close