CHG: bunch of fixes