cast to the higher capacity type instead

Change-Id: I515f315c93dd19016dfdabdf9524606214f84891