fixing by_name and by_fid api