fixed bug with closing settings