corrected parsing for enums