Fix ondelete errors