Fixed overflow bug.