Better handle settings

Better handle settings