closes #841