autoclose fix end