bugfix on bm.cc