Alternative fix to #3594
Merge pull request #3629 from amitmurthy/amitm/ptest

Alternative fix to #3594