fixed Scan All function