Fixed the Index declare