fixed bug in index