fixed some bugs for zero and unit ideal decomposition