closes #871