Modify the return condition of name_resolver func