fixed non-exhaustive match