postprocessing: fixed maximum function