fixed possible null pointer error

Change-Id: I58a5285f88e4f6181556c0a76ed3fa2cab36586f