fixed reading from wrong packet in client