Re-insert code that was discarded in bungled commit