fix pattern matching error (regression)