bug fix, and pass in curUser to index