Fixed problem with settings persitence