Restore code that was killed in 8977bacb54, possibly by accident.(plus typo fix)