More fixes from master