tweaks to properly handle the number of fields