net.cpp fixes