fixed null pointer error

Change-Id: I45055a0c03e0ba431ec5270fc7aeb680beb80d8c