Bugfixes in Scanner