Fix network building filter logic