fixes issue #20: properly handle new argument order to scan