BUG: fixing binary read bug in tests and Network.__init__