Fix Index generation