Fixed prescan algorithm