Fixed an issue with pattern matching