Fix/4.0.x/cal 672

Backport from CAL-668 fix.