Fixed a non-exhaustive patterns error