Fixes subnet and most of the tests.