Fixed SQL typo and added missing quote mark in setting model / update setting value method.