fixed the delete issue