Bug fix: prevent nans from log(0) in CurvatureRegFn