Manual merge of #452. Closes #452.