misc merge fixes from my local repo and Nico's repo