fixed bug in main index