Autoclose option didn't work with delegation