fixed null pointer error

Change-Id: I3bdb44cc5d99c7341d1eed5c0d97202b018071ae