Validation of packet parameters is done before packet lenght is validated. This leads to wrong return status.