Fixed typos and wrong indices