Pulling in latest fixes from master