Change Message::Flags/Type cast to Int, not UInt