small fix for to_name