fixed an issue cause when invalid packets were received and caused parsing to fail altogether