fixed a minor issue on index