Updated algorithm scan process to wait until correctly finished.