This closes #1136