fix integer overflow errors

Change-Id: I76f440a917832c02d7a727697b225bac66b99f56
13 files changed