fix to pattern matching
fix to pattern matching