This closes #1123