You added the check for `last_chunk` being none in the code, but this excerpt wasn't updated to match.