fixed a couple network related bugs