fix  for bug 1391643

-fix for bug 1391643
-rework based on preliminary review by Mike

Change-Id: Icbc4dd6a3ee71c228c2006017030b71508fa0b6f
Merge "fix  for bug 1391643"