Reverts merge of #516.
Manually reverts #516.