define guard cleanup