fix pg problem