Fix corner case where match is missed