bug plotting avgHB