Indent
Fix leak & add dead client detect