             if !NSEqualRanges(rangeOfFirstMatch!, NSMakeRange(NSNotFound, 0)) {
                 let nsLineStr = lineStr as NSString?
                 let substringForFirstMatch = nsLineStr?.substring(with: rangeOfFirstMatch!) as NSString?
-                if (substringForFirstMatch?.range(of: ".").length) != nil {
+                if substringForFirstMatch?.range(of: ".").length != 0 {
                     scaleDegree = Element(lineStr)!
                     // ignore 0.0...same as 1.0, 2.0, etc.
                     if scaleDegree != 0 {

        return trimmedString
    }
    
    fileprivate func numberField(fromScalaString rawStr: String?) -> [Element]? {
        guard let inputStr = rawStr else {return nil}
        
        // default return value is [1.0]

        let nfOctaveReducedSorted = nfOctaveReduce.sorted {$0 < $1}
        numberField = nfOctaveReducedSorted

        // optional uniquify.
        // provide epsilon for frequency equality comparison

        // update
