Fixed some minor scanning bugs.