some more work on porting patches to bb