Fixed order of operations bug in gamma test.