Apply the previous change to buffering.c with a bugfix. There needs to be more change...