Fix non-exhaustive pattern matching