Fixed bug where delete buttons remained after deletion