fixed bug in NBH calculation