Closes #868