Fix an error in get_user_document