fixed bug with scanning same path twice in the same scanning process