correct cast

Change-Id: Ic79ce25bf4ceb4d715aabdabf3824304b02b1f38