Fixing small prediction bugs in BOW functions