fixed null pointer error

Change-Id: Iafd9ce94fc7b5da1b933d85d5f4bb989ef994c89