This should be in a `finally` clause, to make sure it always happens.