erroneous err comparison to nil