fixed missing } in buffer()