Merged more changes from Dscanner.