Fixed an overflow bug.