more fix on handling inappropriate packet and payload length