Bugfix for initial scanning