Fixed rescan bug