Fixed buffer management problems.