fix for scan API
Merge pull request #816 from andrzej-jankowski/scan_api_fix

Fix for scan API