Merge code from clientmode_asw to make postprocess_controller working.