Removing warnings

Removed two of the warnings surrounding integer precision loss.

I was unsure what the intended behaviour was for the sectionIndex value so I just made the best assumption.