closes #765