fixed bug on chart index