Introduced process state to handle resuming correctly.