Fix a few Index to int buggy conversions