fixed bh_delete_minimum() and bh_delete_maximum()

some logic was broken after porting it to use the macro-based linkedlist