diff --git a/src/ch20-03-graceful-shutdown-and-cleanup.md b/src/ch20-03-graceful-shutdown-and-cleanup.md
index c24e463340..174378b935 100644
--- a/src/ch20-03-graceful-shutdown-and-cleanup.md
+++ b/src/ch20-03-graceful-shutdown-and-cleanup.md
@@ -1,6 +1,6 @@
## Graceful Shutdown and Cleanup
-The code in Listing 20-21 is responding to requests asynchronously through the
+The code in Listing 20-20 is responding to requests asynchronously through the
use of a thread pool, as we intended. We get some warnings about the `workers`,
`id`, and `thread` fields that we’re not using in a direct way that reminds us
we’re not cleaning up anything. When we use the less elegant Filename: src/lib.rs
@@ -35,7 +35,7 @@ impl Drop for ThreadPool {
}
```
-Listing 20-23: Joining each thread when the thread pool
+Listing 20-22: Joining each thread when the thread pool
goes out of scope
First, we loop through each of the thread pool `workers`. We use `&mut` for
@@ -178,7 +178,7 @@ thread should run, or it will be a `Terminate` variant that will cause the
thread to exit its loop and stop.
We need to adjust the channel to use values of type `Message` rather than type
-`Job`, as shown in Listing 20-24.
+`Job`, as shown in Listing 20-23.
Filename: src/lib.rs
@@ -236,7 +236,7 @@ impl Worker {
}
```
-Listing 20-24: Sending and receiving `Message` values and
+Listing 20-23: Sending and receiving `Message` values and
exiting the loop if a `Worker` receives `Message::Terminate`
To incorporate the `Message` enum, we need to change `Job` to `Message` in two
@@ -248,9 +248,9 @@ received, and the thread will break out of the loop if the `Terminate` variant
is received.
With these changes, the code will compile and continue to function in the same
-way as it did after Listing 20-21. But we’ll get a warning because we aren’t
+way as it did after Listing 20-20. But we’ll get a warning because we aren’t
creating any messages of the `Terminate` variety. Let’s fix this warning by
-changing our `Drop` implementation to look like Listing 20-25.
+changing our `Drop` implementation to look like Listing 20-24.
Filename: src/lib.rs
@@ -276,7 +276,7 @@ impl Drop for ThreadPool {
}
```
-Listing 20-25: Sending `Message::Terminate` to the
+Listing 20-24: Sending `Message::Terminate` to the
workers before calling `join` on each worker thread
We’re now iterating over the workers twice: once to send one `Terminate`
@@ -302,7 +302,7 @@ messages as there are workers, each worker will receive a terminate message
before `join` is called on its thread.
To see this code in action, let’s modify `main` to accept only two requests
-before gracefully shutting down the server, as shown in Listing 20-26.
+before gracefully shutting down the server, as shown in Listing 20-25.
Filename: src/bin/main.rs
@@ -323,7 +323,7 @@ fn main() {
}
```
-Listing 20-26: Shut down the server after serving two
+Listing 20-25: Shut down the server after serving two
requests by exiting the loop
You wouldn’t want a real-world web server to shut down after serving only two