Fix two bugs in ok_to_prune() (2)