fix byte buffer overflow caused by wrong size info