small bugfixes

Most of all it's code quality improvement. But 595f7ea103d46cb187a26fb74c72332ab01bf0e3 fix real hidden bug in manage_fungal_infection().