Fix #461 improve buffer source