Fixed some errors on index