closes #1023