restore buffer