fixed minus sign error in inv_gamma