fix enum ordinal bugs