Restore code removed in d35373c