code fix for Issue #1158