fixed Perl 5.17.11+ compatibility