Buffer bug fix
merge