fix error with proofs and search patterns