closes #965