Fixed improper order of fields; added test