fix field count bug