Remove bugs and upgrade buffer