db ok and fix bugs in network