Issue/822

Closes #822