Fix weird group logic.
Fix settings if key is not there.