fixed bug about the by-fd lookup