Closes #845