fix bm2 compilation