fix crash buffer overflow.