Fixed NPE when empty packets are received from the server.