bug fix, buffer simplication.