some fixes to bring inline with master