Fix a bug related to resuming torrents.