fixed a nonexhaustive match