fix main index error