fixed parfor error on new greedy method