fix ordering of fields