various fixes
Merge branch 'DW_master' into master