BB fixes from master branch