Closes #765