fixed bug where too many bone indices are added