actually fix the overflow bug