fix: setting the index until which the buffer can be freed