Only use buffer if needed.