Fixed problem with decoding packet header