fixed half of index errors
merge