Closes #842