#2897 Resubmitting the pull request for Issue 2897

Deleted this pull request because of a confusion over branch. Resubmitting it now.