Move update_all and delete_all related code to the bottom.