fix netty dep
Safe calculation of packet size
Fix unit test