closes #1046