treat gradient zeros at residual!=0