closes #1020