Fixed date problems in scan.rb