Addresses issues #779 and #775.