fixing enumeration error