Issue/821

Closes #821