Restore accidentally overwritten changes

Restores the changes made by @boboroshi in
789acc65e76b25420e9bef3f282b9b188216adcf, which I accidentally
overwrote.