fix pattern matching build error