parsing enum fields and minor fixes