cleanup on client