[BPI] Fix two potential divide-by-zero operations that are introduced in r256263.