Proposed fix for #774