fixed null pointer error

Change-Id: Id0b65857f970c1b9983fb0d4ff79c1fdc190bd0f