OPENDNSSEC-358_and_457: Fix all the problems mentioned in the pull request