Closes #816