Merged changes from Dscanner.