Fixed autoclosing