fix bugs. deal with empty brief of all encoding