bug fix for bgiR