closes #1022