Fix cpp style cast and variable name am: 6a70875ba8
am: 59c43578c6

Change-Id: Iff97f1c0b3c2e42bbf8a0344c68c98e2bc38daf7