Proper replacement for #701, closes #691