Fixed indexing to only use uint/int