bring 'mac' branch up to date with small changes in master