[PD-dev] Problem with the error function