[#42050241] Improved fix_species function