closes #1012