Fixed segv.

Change-Id: I1dcfa89e3cd0ef80a0cca194d32e4c1d8cfbebfd