Fixed the other null pointer exception