cleaning up client