Modified version and updated for PowerDNS 2.9.21 (minor fix)