overflow bug fix