improved detection of empty fields.