Fixed CPAN issue #99413
Changed algorithm