Merge "Fix potential divide by zero." am: 8d3f61724d
am: 4642158940

Change-Id: Ie3fe2c70a0cc3713cb47c78a10c020e29c42e42f