fixed bv rewrite rule bug