Avoid overflow

Change-Id: Iedcde3411a1bfeb1eb0207f572c8befe2071f54c