fix indexing error when deleting bubbles