Improved NetworkAgentTest, fixed several issues as a result of testing