correct match indices