Support for PTR records and other fixes