fixing non int index warnings