fastScan function fix