modify 'parseEnum' to prevent parse error