Fix the bug that Scan may request 0 when n is 1
Merge pull request #1904 from zsxwing/fix-scan

Fix the bug that Scan may request 0 when n is 1