Closes #846