Fix deprecated assertions