fix PD diff calculation

Signed-off-by: Sergei Ianovich <ynvich@gmail.com>