Fix process control logics.