Closes #777