Fix null pointer exception
Fixed null pointer exception