fixed non-exhaustive pattern in maybeCompare