fixed autoclose issue