Added automatic closer for the settings