fix bug that stopped the delete button from working