Updated packet error checks on handler()