Fix crash (mostly when matching is confused)