Fixed multiple bugs in networjs