added checks to run postprocessing only if global background exists