Bug Fix and Publish tests

PubRel is always qos 1
Mask qos and type in header construction for safety