fixed some nullpointers, changed network buffer size