fix possible NPE

Change-Id: I369611cc1217c71faf885a52fb1baf9c2f48afec