Updated B40C code to fix testing errors