Fix possible crash on ICS and JB.