fixed null pointer error

Change-Id: I230b675ac05fe2bd2f8ee94e5173c0093e7ad7c8