Added flat fields to all rows and fixed tests