small fixes to construction of greedy