Several fixes for PF 4.0