fixing the buffer queue in both sides