Closes #804