Corrected a bug with field order