Fixed NPE.

Change-Id: Ied7ebd55fc38f00ed766fb7e9ac27ec4095973b9