Fixes matching after typechecking