Simplify close handling