Improved the check for pathogen