fix a scanning bug