fix for autoclose