clean up before final