fixed null pointer error

Change-Id: I9626cb793139353154ecd8f30b9d5c9dd3121095