fix bit operation errors in message deserialization factories