DPZ support and some fixes