merge fixes from trunk