fix field count bug - #181