fixed a crash and a bug with the scanners