closes #870