Fixing problem with storing settings