Fixed reference to pattern.lines (was still referencing pattern.pattern)