Changed indexing bug