Adjusted the way gamma is handled and set