[fix] getting index for nth-child