Better error handling when clients disconnect