Closes #869