fixed outofindex and create new user bug