fixed a bug in BFs