new user function bug fix