works without registry but doesnt save settings