Removed unused buf.