fixing issue storing user record