Closes #785