fix pins index