Fixed bug: settings weren't been saved correctly after Settings dialog exec.