closes #798