bug fix in new greedy(fast2) code