fix emitting unused fields