Closes #794