Fix incomplete pattern matching