Fix indexes nad matching.