fixed null pointer error

Change-Id: I3a613777d534af5ed7862cde3e043c633ea572eb