fix p and g