added autoclose