correcting grad_not_implemented