fix bagnum bug