Fix error when bags are disabled.