bugfixes in BV (off by one...)