Fixed bugs for enum fields