Closes #781