Fixes to matching types