Closes #782