minor optimization in Bmac code