fix thread boundary on receive buffer