Fix index normalization of generated cells