Proposed fix for #1107