ref #80: scanning improvements