cast loses precision

Change-Id: Ic688f08cada4ae70ea1dfb1e29e249a166456452