Fixed pattern matching warnings