fixed buffer reset after sync