Fixed sql typo and updated settings class.