saving and loading network to/from the database now works properly