fix another bug in create_user_and_agent