Possible fix for Issue #977

Please run tests for this fix before we proceed?