fix bug scanning with readallfields=false