Closes #858