fix domain of p