closes #1011