Correct curves indexes bug