fixed autoclosing