Several fixes for PDP