fix bug if some config are missing
handle new mask system