Buffer fixes