c_4_grad: crash bug fix for gradient of scalar field