Null pointer Fix