Fixing the issue #3292

This change fixes the issue #3292. The details were mentioned in the comments to the issue.