Mastering is usually the final step after editing, restoring, EQing, or mixing. It does not magically fix every stem separately. If you are working with stems, finish your stem edits first, export the mixed result, then import that mix again and master it as one full track.