scanner bug fixes
fixed bugs