Repaired segmentation fault after client disconnection