Fixes matching after typechecking

review @xeno-by