Issue #1962358 by grom358: Fixed typo with call to moduleExists and replaced a deprecated call to module_exists