fix delete_before/after bug in bulk_update