Add extra cleanup where appropriate.