fixed broken list in c++ index