added some minor scanning improvements