Closes #822