Fixed StackOverflowException when no settings presents.