Fixed Index OOB error (part 2)