fixed error in json index method