Fixes #244

Fix scan command for CLI.