fixed a small error in the enumeration procedure