fix crash issue for too big packet size