Minor modifications to the scanning library