Null pointer fixed