Fixed BMF bug