Fix history on exec