Tweaked main Index file to try to fix a bug