closes #1004