They can rot if they are watered too much, if there is too much nitrogen in the soil, and sometimes when the foliage is infected with a bacteria that tends to attack plants that are overwatered. The best thing to do is plant them in soil that has very good drainage.
For the most part, throw out the rotted ones. They have become infected with a bacteria and are not likely to recover.

