updating index, fixing a bug in the gallery