Added feature to autoclose of settings