fixed null pointer error

Change-Id: I7b184315120e5862174a3a136ef1fb5bd8e42e29