fix bad capacity reset behavior (you want to remove the first ones in the buffer, not the last ones)