Fixed negative D value crash