Fix to 2-parameter PDF and improvements on integration