Reimplement packet buffer, correctly